
FROM debian:10

# install gosu
RUN set -eux; \
    echo deb http://mirrors.aliyun.com/debian/ buster main non-free contrib > /etc/apt/sources.list; \
	apt-get update; \
	apt-get install -y gosu; \
	rm -rf /var/lib/apt/lists/*; \
	gosu nobody true; 

# copy service executable
COPY ./erasure-service ./docker-entrypoint.sh /
RUN chmod +x /erasure-service /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]
